package com.Encounter.d7_method_references;

/**
 * @author Encounter
 * @date 2024/6/22 12:16
 */
public class Car
    {
        private String name;
        private double price;

        public Car(String name, double price)
            {
                this.name = name;
                this.price = price;
            }

        public Car()
            {
            }

        public String getName()
            {
                return name;
            }

        public void setName(String name)
            {
                this.name = name;
            }

        public double getPrice()
            {
                return price;
            }

        public void setPrice(double price)
            {
                this.price = price;
            }

        @Override
        public String toString()
            {
                return "Car{" +
                        "name='" + name + '\'' +
                        ", price=" + price +
                        '}';
            }
    }
